<?php
namespace app\common\model;

use think\Model;

class SystemGroup extends Model
{
    // 开启自动写入时间戳字段
    protected $autoWriteTimestamp = true;
    // 定义时间戳字段名
    protected $createTime = 'create_time';
    protected $updateTime = 'update_time';


	public function items()
	{
		return $this->hasMany(SystemItem::class);
	}
	public function getStatusTextAttr($value,$data)
    {
        $status = [0=>'禁用',1=>'正常'];
        return $status[$data['status']];
    }

}